load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("//pkg/testutils:buildutil/buildutil.bzl", "disallowed_imports_test")

go_library(
    name = "cockroach_lib",
    srcs = ["main.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/cmd/cockroach",
    visibility = ["//visibility:private"],
    deps = [
        "//pkg/ccl",
        "//pkg/ccl/cliccl",
        "//pkg/cli",
        "//pkg/ui/distccl",
    ],
)

disallowed_imports_test(
    "cockroach_lib",
    [
        "//pkg/sql/randgen",
        "//pkg/testutils/testcluster",
    ],
)

go_binary(
    name = "cockroach",
    embed = [":cockroach_lib"],
    exec_properties = {"Pool": "large"},
    visibility = ["//visibility:public"],
)
